import request from '@/utils/request'
let baseUrl =
  process.env.NODE_ENV === 'production' ? '/api/riskGateway' : 'riskGateway'
// 数据源名称map接口
export const getNameMap = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/interface-config/datasource-names',
    method: 'post',
    data
  })
// 调用方式map接口
export const getTypeMap = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/datasource-config/type-map',
    method: 'post',
    data
  })
// list接口
export const getList = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/interface-config/list',
    method: 'post',
    data
  })
// add接口
export const add = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/datasource-config/add',
    method: 'post',
    data
  })
// update
export const update = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: 'interface-config/update',
    method: 'post',
    data
  })
// delete
export const del = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/interface-config/delete/' + data,
    method: 'get'
  })
